home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / lib / pm-utils / sleep.d / 48hid2hci < prev    next >
Text File  |  2008-10-26  |  361b  |  25 lines

  1. #!/bin/sh
  2. # Switch all devices that were in a HID mode to HCI mode
  3. # after a resume
  4.  
  5. . "${PM_FUNCTIONS}"
  6.  
  7. [ -f /etc/default/bluetooth ] || exit $NA
  8.  
  9. . /etc/default/bluetooth
  10.  
  11. hid2hci()
  12. {
  13.     if [ "$HID2HCI_ENABLED" = "1" ] && [ -x /usr/sbin/hid2hci ]; then
  14.         /usr/sbin/hid2hci --tohci
  15.         fi
  16. }
  17.  
  18. case "$1" in
  19.     thaw|resume)
  20.         hid2hci
  21.         ;;
  22.     *) exit $NA
  23.         ;;
  24. esac
  25.